/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package testsql.javaphp;
import java.io.*;
import java.net.*;
/**
 *
 * @author lamagat
 */
public class javaphp{
    
    public static void main(String[] args){

        
               
    {
     URLConnection connection = null;
     try
     {
      URL url = new URL("jdbc:mysql://localhost/javaphp.php" );
      connection = url.openConnection();
      //connection.setRequestMethod("POST" );
      connection.setDoInput(true);
      connection.setDoOutput(true);
      String datipost = URLEncoder.encode("msg", "UTF-8" ) + "=" + URLEncoder.encode("zutflute", "UTF-8" );
      DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
      wr.writeBytes(datipost);
      wr.flush();
      wr.close();
      //m_answer.setText("tout roule" );
     }
     catch (Exception e)
     {
         e.printStackTrace();
     }
    }
    }


            
       
}

